import java.io.File;

public class Main {
    public static void main(String[] args) {

        System.out.println("Hello, World!");
        File file = new File(".");
        System.out.println(file.getAbsolutePath());
        int dirCount = 0;
        int fileCount = 0;
        long fileSize = 0;

        File[] files = file.listFiles();
        for(int i = 0;i < files.length;i++){
            if(files[i].isDirectory()){
                dirCount++;
                System.out.println(files[i].getName()+"\t<Directory>");

            }
            if(files[i].isFile()){
                fileCount++;
                fileSize += files[i].length();
                System.out.println(files[i].getName()+"\t<File>"+files[i].length());

            }
        }
        System.out.println(dirCount+"\t<Dir>");
        System.out.println(fileCount+"\t<File>");
        System.out.println(fileSize+"\t<Size>");
//        ByteStreamDemo bsd = new ByteStreamDemo();
//        bsd.output(".","诗句");
        ByteStreamDemo bsd = new ByteStreamDemo();
        bsd.input(".","诗句");

//        CharStreamDemo.writer(".","test");
//        CharStreamDemo.reader(".","test");
    }
}